package org.megha.blog.example.part6;

/** Creates some ThreeDObjects and prints their details */
public class Main {

	private static void printSurfaceAreaRatio(ThreeDObject obj) {
		System.out.println("------------------");
		System.out.println("for object " + obj);
		System.out.println("surface area " + obj.getSurfaceArea());
		System.out.println("volume " + obj.getVolume());
		System.out.println("surface area to volume ratio " + obj.getSurfaceToVolumeRatio());
	}

	public static void main(String args[]) {
		printSurfaceAreaRatio(new Sphere(1));
		printSurfaceAreaRatio(new Sphere(2));
		printSurfaceAreaRatio(new Cylinder(1, 1));
		printSurfaceAreaRatio(new Cylinder(1, 2));
		printSurfaceAreaRatio(new Cylinder(2, 1));
		printSurfaceAreaRatio(new Cylinder(2, 2));
	}
}
